/**
 * Created by elewen on 2017/5/24.
 */
(function(){
    app.run(function($rootScope, AuthService, $state){
        $rootScope.user = {};

        AuthService.loginUsingAccessToken().then(
            function (suc) {
                console.log('demo登陆---', suc);
                $rootScope.user = suc;
            }, function (err) {
                toaster.pop('error', null, '系统错误！', 1000);
            }
        );
    });
})();